shared_examples_for "a client" do 
  it ".account should be instance of SmtpcomApi::Account" do
    client.account.should be_an_instance_of(SmtpcomApi::Account)
  end

  it ".sender should be instanse of SmtpcomApi::Sender" do
    client.sender(:vasiliy).should be_an_instance_of(SmtpcomApi::Sender)
  end

  it ".senders should be array of senders" do
    senders = client.senders
    senders.should be_an_instance_of Array
    senders.each do |s|
      s.should be_an_instance_of SmtpcomApi::Sender
    end
  end

  it ".add_sender should return instanse of SmtpcomApi::Sender" do
    s = {:label => 'my_new_sender11', :login => 'my_new_sender11', :password => 'my_pass1'}
    client.add_sender(s).should be_an_instance_of(SmtpcomApi::Sender)
  end
end